﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "IObject.h"

namespace gcmp
{
    class IElement;

    /// \brief 元素查找过滤接口
    ///
    /// 通过文档获取元素时，使用该接口将不需要的元素过滤掉
    class GCMP_MODEL_INTERFACE_EXPORT IElementFilter : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::IElementFilter, gcmp::IObject)
    public:
        /// \brief 判断元素是否通过过滤器
        /// \return true 通过，false 不通过
        virtual bool PassesFilter(const IElement* pElement) const = 0;

    public:
        virtual ~IElementFilter() = 0;
    };
}

